import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/generated/a.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

class ValueBorderItem extends StatelessWidget {
  final String title;
  final String value;
  final Color valueColor;
  final double horizontalPadding;

  const ValueBorderItem(
      {Key key,
      this.valueColor,
      this.title,
      this.value,
      this.horizontalPadding})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(
        horizontal: horizontalPadding ?? getDp(35),
      ),
      padding: EdgeInsets.symmetric(horizontal: getDp(12), vertical: getDp(7)),
      decoration: BoxDecoration(
          color: Colors.white,
          border: Border.all(
            color: aceGrayColor,
            width: getDp(0.5),
          ),
          borderRadius: BorderRadius.circular(getDp(15))),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.min,
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(
            title??'',
            style: TextStyle(
              color: aceDarkGrayColor,
              fontSize: getSp(12),
              fontWeight: FontWeight.w400,
              height: 16 / 12,
            ),
          ),
          SizedBox(
            height: getDp(6),
          ),
          Text(
            value??'',
            style: TextStyle(
              color: valueColor??aceBlackColor,
              fontSize: getSp(16),
              fontWeight: FontWeight.w700,
              height: 1,
            ),
          ),
          SizedBox(
            height: getDp(4),
          ),
        ],
      ),
    );
  }
}
